﻿namespace ClassLibrary.BusinessLayer.Facade
{
    using ClassLibrary.BusinessLayer.BusinessObjects;
    using ClassLibrary.DataLayer.DataObjects;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.Common;

    [DataObject(true)]
    public class ProcedureSetTmpltFacade
    {
        private IProcedureSetTmpltDAO procedureSetTmpltDAO = DAOAccess.ProcedureSetTmpltDAO;

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public bool AddProcedureSetTmplt(ProcedureSetTmplt clsProcedureSetTmplt)
        {
            return this.procedureSetTmpltDAO.InsertProcedureSetTmplt(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public int AddProcedureSetTmpltAndReturnIdentity(ProcedureSetTmplt clsProcedureSetTmplt)
        {
            return this.procedureSetTmpltDAO.InsertProcedureSetTmpltReturnIdentity(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public string AddProcedureSetTmpltAndReturnOutput(ProcedureSetTmplt clsProcedureSetTmplt)
        {
            return this.procedureSetTmpltDAO.InsertProcedureSetTmpltReturnOutput(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Delete)]
        public bool DeleteProcedureSetTmplt(ProcedureSetTmplt clsProcedureSetTmplt)
        {
            return this.procedureSetTmpltDAO.DeleteProcedureSetTmplt(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSetTmplt> GetProcedureSetTmplt(ProcedureSetTmplt clsProcedureSetTmplt)
        {
            return this.procedureSetTmpltDAO.GetProcedureSetTmplt(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSetTmplt> GetProcedureSetTmplt(string procedureSetTmplt)
        {
            ProcedureSetTmplt clsProcedureSetTmplt = new ProcedureSetTmplt();
            clsProcedureSetTmplt._HeadingSet = procedureSetTmplt;
            return this.procedureSetTmpltDAO.GetProcedureSetTmplt(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSetTmplt> GetsProcedureSetTmplt()
        {
            return this.procedureSetTmpltDAO.GetsProcedureSetTmplt();
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public DataTable GetsProcedureSetTmplt(string SPName, DbParameter[] param)
        {
            return this.procedureSetTmpltDAO.GetsProcedureSetTmplt(SPName, param);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSetTmplt> ListProcedureSetTmplt(ProcedureSetTmplt clsProcedureSetTmplt)
        {
            return this.procedureSetTmpltDAO.ListProcedureSetTmplt(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSetTmplt> ListProcedureSetTmplt(string procedureSetTmplt)
        {
            ProcedureSetTmplt clsProcedureSetTmplt = new ProcedureSetTmplt();
            clsProcedureSetTmplt._HeadingSet = procedureSetTmplt;
            return this.procedureSetTmpltDAO.ListProcedureSetTmplt(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public bool UpdateProcedureSetTmplt(ProcedureSetTmplt clsProcedureSetTmplt)
        {
            return this.procedureSetTmpltDAO.UpdateProcedureSetTmplt(clsProcedureSetTmplt);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public int UpdateProcedureSetTmplt(string SPName, DbParameter[] param)
        {
            return this.procedureSetTmpltDAO.UpdateProcedureSetTmplt(SPName, param);
        }
    }
}

